<?php

class Admin_Controller extends CI_Controller 
{
	function __construct()
	{
		parent::CI_Controller();
		$this->is_admin();
	}

	function is_admin()
	{
		$is_admin = $this->session->userdata('is_admin');
		if(!isset($is_admin) || $is_admin != true)
		{
			echo 'You don\'t have permission to access this page. <a href="../login">Login</a>';	
			die();		
			//$this->load->view('login_form');
		}		
	}	

}

?>
